<!-- newInvoice 页面内容 -->
<section class="newInvoice" ng-controller="newInvoiceCtrl">
  <!-- 面包屑导航 -->
  <div class="row margin-reset breadcrumb-row">
      <ol class="breadcrumb padding-reset">
          <li ng-click="goBack();"><a>发票管理</a></li>
          <li><a>申请发票</a></li>
      </ol>
  </div>

  <form name="newInvoiceForm" role="form" autocomplete="false" novalidate ng-submit="newInvoice();">
      <div class="row margin-reset order-list-row">
          <div class="panel yf-shadow">
              <div class="panel-heading">
                  <div class="row">
                      <div class="col-xs-1 text-center">
                          <input type="checkbox" class="heading-checkbox" ng-model="selectAll" ng-click="all(selectAll);">
                      </div>
                      <div class="col-xs-11">
                          <h4>可开发票的订单</h4>
                      </div>
                  </div>
              </div>

              <div class="panel-body">
                  <div class="row text-center" ng-if="orders.length == 0">
                      暂无可开发票的订单
                  </div>
                  <div class="row" ng-repeat="order in orders track by $index">
                      <div class="col-xs-11 col-xs-offset-1">
                          <div class="pull-left">
                              订单号：{{order.serial_number}}
                          </div>
                          <div class="pull-right money">
                              {{ orderTotal(order.total, order.measure_amount) | moneyint }}元
                          </div>
                      </div>

                      <div class="col-xs-1 text-center">
                          <input type="checkbox" ng-model="order.state" ng-click="getSeletedArr($index, order.state, order.id);">
                      </div>
                      <div class="col-xs-11">
                          <div class="pull-left">
                              预估面积：{{order.square}}㎡
                          </div>
                      </div>

                      <div class="col-xs-11 col-xs-offset-1">
                          <div class="pull-left">
                              测量：{{order.customer_service_info.name}} / 安装：{{order.service_info.name}}
                          </div>
                          <div class="pull-right">
                              {{order.updated_at * 1000 | date:"yyyy-MM-dd HH:mm"}}
                          </div>
                      </div>
                  </div>
              </div>
          </div>
      </div>

      <div class="row margin-reset invoiceInfo-row">
          <div class="panel yf-shadow">
              <div class="panel-heading">
                  <h4>发票信息</h4>
              </div>
              <div class="panel-body">
                  <div class="row margin-reset">
                      <div class="col-sm-2 col-xs-12 info-tag">
                          发票类型
                      </div>
                      <div class="col-sm-3 col-xs-12">
                          <div class="radio">
                              <label>
                              <input type="radio" value="common" ng-model="invoice.invoice_type">普通发票
                            </label>
                          </div>
                      </div>
                      <div class="col-sm-3 col-xs-12">
                          <div class="radio">
                              <label>
                              <input type="radio" value="added" ng-model="invoice.invoice_type">增值税发票
                            </label>
                          </div>
                      </div>
                  </div>
                  <div class="row margin-reset">
                      <div class="col-sm-2 col-xs-12 info-tag">
                          发票抬头
                      </div>
                      <div class="col-sm-5 col-xs-12">
                          <input type="text" class="form-control mt_input" ng-model="invoice.company_name" value="{{invoice.company_name}}">
                      </div>
                  </div>
                  <div class="row margin-reset">
                      <div class="col-sm-2 col-xs-12 info-tag">
                          发票内容
                      </div>
                      <div class="col-sm-5 col-xs-12">
                          <input type="text" class="form-control mt_input" ng-model="invoice.content">
                      </div>
                  </div>
              </div>
          </div>
      </div>

      <div class="row margin-reset reserver-row">
          <div class="panel yf-shadow">
              <div class="panel-heading">
                  <h4>收件人信息</h4>
              </div>
              <div class="panel-body">
                  <div class="row margin-reset">
                      <div class="col-sm-2 col-xs-12 info-tag">
                          收件人姓名
                      </div>
                      <div class="col-sm-5 col-xs-12">
                          <input type="text" class="form-control mt_input" ng-model="invoice.name">
                      </div>
                  </div>
                  <div class="row margin-reset">
                      <div class="col-sm-2 col-xs-12 info-tag">
                          手机号
                      </div>
                      <div class="col-sm-5 col-xs-12">
                          <input type="text" class="form-control mt_input" ng-model="invoice.tel">
                      </div>
                  </div>
                  <div class="row margin-reset">
                      <div class="col-sm-2 col-xs-12 info-tag">
                          收件地址
                      </div>
                      <div class="col-sm-7 col-xs-12">
                          <input type="text" class="form-control mt_input" ng-model="invoice.street">
                      </div>
                  </div>
              </div>
          </div>
      </div>

      <div class="row margin-reset btn-row">
          <div class="col-xs-12">
              <button type="submit" class="btn btn-mt-ok">确认提交</button>
              <a class="back-btn" ng-click="goBack();">取消</a>
          </div>
      </div>
  </form>

</section>
